<?php
$host='127.0.0.1';
$username='root';
$pass='';
$link=@mysql_connect($host,$username,$pass);
mysql_query("set names utf8");
$sql=mysql_query("show databases;");
while($a=mysql_fetch_row($sql)){
    echo "<a style='padding-right: 15px' href='my.php?database=$a[0]'>".$a[0]."</a>";
}
echo '<br/>';
if(!empty($_GET['database'])){
    $db=$_GET['database'];
    mysql_select_db($db);
    $sql1=mysql_query("show tables");
    while($b=mysql_fetch_array($sql1)){
        echo "<a style='padding-right: 15px' href='my.php?database=$db&table=$b[0]'>".$b[0]."</a>";
    }
}
if(!empty($_GET['table'])){
    $tab=$_GET['table'];
    $sql2=mysql_query("desc $tab");
    while($c=mysql_fetch_array($sql2)){
        var_dump($c[0]);
    }
}
?>